package designPattern.prototype.improve;


public class Client {
    public static void main(String[] args) {
        System.out.println("原型模式实现对象的创建");
        Sheep sheep1 = new Sheep("tom", 1, "白色");

        Sheep sheep2 = (Sheep) sheep1.clone();//克隆
        Sheep sheep3 = (Sheep) sheep1.clone();//克隆
        Sheep sheep4 = (Sheep) sheep1.clone();//克隆
        Sheep sheep5 = (Sheep) sheep1.clone();//克隆
        Sheep sheep6 = (Sheep) sheep1.clone();//克隆


        System.out.println(sheep1);
        System.out.println(sheep2);
        System.out.println(sheep3);
        System.out.println(sheep4);
        System.out.println(sheep5);
    }
}
